package mjc.egg;
import mjc.compiler.*;
import mjc.gc.*;
import mg.egg.eggc.compiler.libjava.lex.*;
import mg.egg.eggc.compiler.libjava.messages.*;
import mg.egg.eggc.compiler.libjava.*;
import mg.egg.eggc.compiler.libjava.problem.IProblem;
import java.util.Vector;
public class S_INST_MJAVA {
LEX_MJAVA scanner;
  S_INST_MJAVA() {
    }
  S_INST_MJAVA(LEX_MJAVA scanner) {
    this.scanner = scanner;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  TDS att_htdsclasses;
  TDS att_htdsvarlocales;
  INFOCLASSE att_hinfoclasse;
  TDS att_tdsvarlocales;
  LEX_MJAVA att_scanner;
  private void regle26() throws Exception {

    //declaration
    S_TYPE_MJAVA x_2 = new S_TYPE_MJAVA(scanner) ;
    T_MJAVA x_3 = new T_MJAVA(scanner ) ;
    S_AFFX_MJAVA x_5 = new S_AFFX_MJAVA(scanner) ;
    T_MJAVA x_6 = new T_MJAVA(scanner ) ;
    //appel
      action_auto_inh_26(x_2, x_3, x_5);
    x_2.analyser() ;
    x_3.analyser(LEX_MJAVA.token_ident);
      action_action_26(x_2, x_3, x_5);
    x_5.analyser() ;
    x_6.analyser(LEX_MJAVA.token_pv);
  }
  private void regle27() throws Exception {

    //declaration
    S_E_MJAVA x_2 = new S_E_MJAVA(scanner) ;
    T_MJAVA x_3 = new T_MJAVA(scanner ) ;
    //appel
      action_auto_inh_27(x_2);
    x_2.analyser() ;
    x_3.analyser(LEX_MJAVA.token_pv);
      action_action_27(x_2);
  }
  private void regle28() throws Exception {

    //declaration
    S_BLOC_MJAVA x_2 = new S_BLOC_MJAVA(scanner) ;
    //appel
      action_auto_inh_28(x_2);
    x_2.analyser() ;
      action_action_28(x_2);
  }
  private void regle29() throws Exception {

    //declaration
    T_MJAVA x_2 = new T_MJAVA(scanner ) ;
    T_MJAVA x_3 = new T_MJAVA(scanner ) ;
    S_E_MJAVA x_4 = new S_E_MJAVA(scanner) ;
    T_MJAVA x_5 = new T_MJAVA(scanner ) ;
    S_BLOC_MJAVA x_8 = new S_BLOC_MJAVA(scanner) ;
    S_SIX_MJAVA x_9 = new S_SIX_MJAVA(scanner) ;
    //appel
      action_auto_inh_29(x_4, x_8, x_9);
    x_2.analyser(LEX_MJAVA.token_si);
    x_3.analyser(LEX_MJAVA.token_paro);
    x_4.analyser() ;
    x_5.analyser(LEX_MJAVA.token_parf);
      action_etage_29(x_4, x_8, x_9);
      action_typage4_29(x_4, x_8, x_9);
    x_8.analyser() ;
    x_9.analyser() ;
      action_remontee_29(x_4, x_8, x_9);
  }
  private void regle32() throws Exception {

    //declaration
    T_MJAVA x_2 = new T_MJAVA(scanner ) ;
    S_E_MJAVA x_3 = new S_E_MJAVA(scanner) ;
    T_MJAVA x_4 = new T_MJAVA(scanner ) ;
    //appel
      action_auto_inh_32(x_3);
    x_2.analyser(LEX_MJAVA.token_retour);
    x_3.analyser() ;
    x_4.analyser(LEX_MJAVA.token_pv);
      action_remontee_32(x_3);
  }
  private void regle33() throws Exception {

    //declaration
    T_MJAVA x_2 = new T_MJAVA(scanner ) ;
    T_MJAVA x_3 = new T_MJAVA(scanner ) ;
    S_E_MJAVA x_4 = new S_E_MJAVA(scanner) ;
    T_MJAVA x_7 = new T_MJAVA(scanner ) ;
    S_BLOC_MJAVA x_8 = new S_BLOC_MJAVA(scanner) ;
    //appel
      action_auto_inh_33(x_4, x_8);
    x_2.analyser(LEX_MJAVA.token_tantque);
    x_3.analyser(LEX_MJAVA.token_paro);
    x_4.analyser() ;
      action_etage_33(x_4, x_8);
      action_typage5_33(x_4, x_8);
    x_7.analyser(LEX_MJAVA.token_parf);
    x_8.analyser() ;
      action_remontee_33(x_4, x_8);
  }
private void action_etage_33(S_E_MJAVA x_4, S_BLOC_MJAVA x_8) throws Exception {
try {
// instructions
x_8.att_htdsvarlocales= new TDS(this.att_htdsvarlocales);
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_29(S_E_MJAVA x_4, S_BLOC_MJAVA x_8, S_SIX_MJAVA x_9) throws Exception {
try {
// instructions
x_4.att_htdsvarlocales=this.att_htdsvarlocales;
x_4.att_htdsclasses=this.att_htdsclasses;
x_8.att_htdsclasses=this.att_htdsclasses;
x_9.att_htdsclasses=this.att_htdsclasses;
x_4.att_hinfoclasse=this.att_hinfoclasse;
x_8.att_hinfoclasse=this.att_hinfoclasse;
x_9.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_28(S_BLOC_MJAVA x_2) throws Exception {
try {
// instructions
x_2.att_htdsvarlocales=this.att_htdsvarlocales;
x_2.att_htdsclasses=this.att_htdsclasses;
x_2.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_27(S_E_MJAVA x_2) throws Exception {
try {
// instructions
x_2.att_htdsvarlocales=this.att_htdsvarlocales;
x_2.att_htdsclasses=this.att_htdsclasses;
x_2.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_26(S_TYPE_MJAVA x_2, T_MJAVA x_3, S_AFFX_MJAVA x_5) throws Exception {
try {
// instructions
x_5.att_htdsvarlocales=this.att_htdsvarlocales;
x_2.att_htdsclasses=this.att_htdsclasses;
x_5.att_htdsclasses=this.att_htdsclasses;
x_2.att_hinfoclasse=this.att_hinfoclasse;
x_5.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_etage_29(S_E_MJAVA x_4, S_BLOC_MJAVA x_8, S_SIX_MJAVA x_9) throws Exception {
try {
// instructions
x_8.att_htdsvarlocales= new TDS(this.att_htdsvarlocales);
x_9.att_htdsvarlocales= new TDS(this.att_htdsvarlocales);
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_typage5_33(S_E_MJAVA x_4, S_BLOC_MJAVA x_8) throws Exception {
try {
// instructions
if (x_4.att_type.compareTo( new DTYPE("booleen", 1))){
System.out.print(""+"l'expression conditionelle n'est pas un booleen\n");
}

}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_remontee_32(S_E_MJAVA x_3) throws Exception {
try {
// instructions
this.att_tdsvarlocales=this.att_htdsvarlocales;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_typage4_29(S_E_MJAVA x_4, S_BLOC_MJAVA x_8, S_SIX_MJAVA x_9) throws Exception {
try {
// instructions
if (x_4.att_type.compareTo( new DTYPE("booleen", 1))){
System.out.print(""+"l'expression conditionelle n'est pas un booleen");
}

}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_26(S_TYPE_MJAVA x_2, T_MJAVA x_3, S_AFFX_MJAVA x_5) throws Exception {
try {
// locales
INFOATTRIBUT loc_i;
// instructions
    this.att_htdsvarlocales.inserer(x_3.att_txt,  new INFOATTRIBUT(x_3.att_txt, x_2.att_type));
loc_i= new INFOATTRIBUT(x_3.att_txt, x_2.att_type);
System.out.print(""+"V VAR LOCALE: "+loc_i.toString()+"\n");
this.att_tdsvarlocales=this.att_htdsvarlocales;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_remontee_33(S_E_MJAVA x_4, S_BLOC_MJAVA x_8) throws Exception {
try {
// instructions
this.att_tdsvarlocales=this.att_htdsvarlocales;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_27(S_E_MJAVA x_2) throws Exception {
try {
// instructions
this.att_tdsvarlocales=this.att_htdsvarlocales;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_action_28(S_BLOC_MJAVA x_2) throws Exception {
try {
// instructions
this.att_tdsvarlocales=x_2.att_tdsvarlocales;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_33(S_E_MJAVA x_4, S_BLOC_MJAVA x_8) throws Exception {
try {
// instructions
x_4.att_htdsvarlocales=this.att_htdsvarlocales;
x_4.att_htdsclasses=this.att_htdsclasses;
x_8.att_htdsclasses=this.att_htdsclasses;
x_4.att_hinfoclasse=this.att_hinfoclasse;
x_8.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_remontee_29(S_E_MJAVA x_4, S_BLOC_MJAVA x_8, S_SIX_MJAVA x_9) throws Exception {
try {
// instructions
this.att_tdsvarlocales=this.att_htdsvarlocales;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
private void action_auto_inh_32(S_E_MJAVA x_3) throws Exception {
try {
// instructions
x_3.att_htdsvarlocales=this.att_htdsvarlocales;
x_3.att_htdsclasses=this.att_htdsclasses;
x_3.att_hinfoclasse=this.att_hinfoclasse;
}catch(RuntimeException e) {		//e.printStackTrace();
       scanner._interrompre(IProblem.Internal, scanner.getBeginLine(), ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,e.getStackTrace());
	}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MJAVA.token_int : // 19927
        regle26 () ;
      break ;
      case LEX_MJAVA.token_bool : // 19928
        regle26 () ;
      break ;
      case LEX_MJAVA.token_void : // 19926
        regle26 () ;
      break ;
      case LEX_MJAVA.token_ident : // 19955
        scanner.lit ( 2 ) ;
        switch ( scanner.fenetre[1].code ) {
          case LEX_MJAVA.token_ident : // 19955
            regle26 () ;
          break ;
          case LEX_MJAVA.token_pt : // 19921
            regle27 () ;
          break ;
          case LEX_MJAVA.token_paro : // 19913
            regle27 () ;
          break ;
          case LEX_MJAVA.token_mult : // 19945
            regle27 () ;
          break ;
          case LEX_MJAVA.token_div : // 19946
            regle27 () ;
          break ;
          case LEX_MJAVA.token_mod : // 19947
            regle27 () ;
          break ;
          case LEX_MJAVA.token_et : // 19948
            regle27 () ;
          break ;
          case LEX_MJAVA.token_plus : // 19942
            regle27 () ;
          break ;
          case LEX_MJAVA.token_moins : // 19943
            regle27 () ;
          break ;
          case LEX_MJAVA.token_ou : // 19944
            regle27 () ;
          break ;
          case LEX_MJAVA.token_inf : // 19936
            regle27 () ;
          break ;
          case LEX_MJAVA.token_infeg : // 19937
            regle27 () ;
          break ;
          case LEX_MJAVA.token_sup : // 19938
            regle27 () ;
          break ;
          case LEX_MJAVA.token_supeg : // 19939
            regle27 () ;
          break ;
          case LEX_MJAVA.token_eg : // 19940
            regle27 () ;
          break ;
          case LEX_MJAVA.token_neg : // 19941
            regle27 () ;
          break ;
          case LEX_MJAVA.token_affect : // 19922
            regle27 () ;
          break ;
          case LEX_MJAVA.token_pv : // 19920
            regle27 () ;
          break ;
          default :
                   scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMJAVAMessages.id_MJAVA_unexpected_token,MJAVAMessages.MJAVA_unexpected_token,new String[]{scanner.fenetre[1].getNom()});
scanner.accepter_sucre(LEX_MJAVA.token_ident);
        }
      break ;
      case LEX_MJAVA.token_entier : // 19954
        regle27 () ;
      break ;
      case LEX_MJAVA.token_vrai : // 19950
        regle27 () ;
      break ;
      case LEX_MJAVA.token_faux : // 19951
        regle27 () ;
      break ;
      case LEX_MJAVA.token_plus : // 19942
        regle27 () ;
      break ;
      case LEX_MJAVA.token_moins : // 19943
        regle27 () ;
      break ;
      case LEX_MJAVA.token_non : // 19949
        regle27 () ;
      break ;
      case LEX_MJAVA.token_null : // 19935
        regle27 () ;
      break ;
      case LEX_MJAVA.token_paro : // 19913
        regle27 () ;
      break ;
      case LEX_MJAVA.token_nouveau : // 19932
        regle27 () ;
      break ;
      case LEX_MJAVA.token_this : // 19952
        regle27 () ;
      break ;
      case LEX_MJAVA.token_super : // 19953
        regle27 () ;
      break ;
      case LEX_MJAVA.token_aco : // 19915
        regle28 () ;
      break ;
      case LEX_MJAVA.token_si : // 19923
        regle29 () ;
      break ;
      case LEX_MJAVA.token_retour : // 19931
        regle32 () ;
      break ;
      case LEX_MJAVA.token_tantque : // 19925
        regle33 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMJAVAMessages.id_MJAVA_unexpected_token,MJAVAMessages.MJAVA_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
